* @cache:
* @key: A cache key
* @size: Size in pixels
+ * @policy: Cache policy
* @request: (out): If no request is outstanding, one will be created and returned here
* @texture: (out): A new texture, also added to the request
*
create_texture_and_ensure_request (StTextureCache *cache,
const char *key,
guint size,
+ StTextureCachePolicy policy,
AsyncTextureLoadData **request,
ClutterActor **texture)
{
{
/* Not cached and no pending request, create it */
*request = g_new0 (AsyncTextureLoadData, 1);
- g_hash_table_insert (cache->priv->outstanding_requests, g_strdup (key), *request);
+ if (policy != ST_TEXTURE_CACHE_POLICY_NONE)
+ g_hash_table_insert (cache->priv->outstanding_requests, g_strdup (key), *request);
}
else
*request = pending;
}
g_free (gicon_string);
- if (create_texture_and_ensure_request (cache, key, size, &request, &texture))
+ if (create_texture_and_ensure_request (cache, key, size, policy, &request, &texture))
{
g_free (key);
return texture;